export function getTreeId (list,node,key) {
  let arr = []
  function getid (list,node,key) {
    if(list && list.length>0) {
      list.forEach(el => {
        arr.push(el[key])
        if(el[node]&&el[node].length>0){
          getid(el[node],node,key)
        }
      });
    }
  }
  getid(list,node,key)
  return arr
}
export default getTreeId